def print_visitor(names):
	for name in names:
		print(f'邀请 {name} 共进晚餐')

names = ['zhangsan', 'lisi', 'wangwu']

print_visitor(names)
print(f'{names[1]} 无法到访')
# names.remove('lisi')
# del names[1]
names[1] = 'zhaoliu'
print_visitor(names)

print('我找到了更大的餐桌')
names.insert(0, '打仗三')
midlle = len(names) / 2
names.insert(int(midlle), "中张三")
names.append('尾张三')
print_visitor(names)

print("我只能邀请两位嘉宾共进晚餐")
while len(names) > 2:
	print(f'抱歉，无法邀请 {names.pop()} 共进晚餐');

print_visitor(names)
print(f'一共邀请了{len(names)} 个人共进晚餐')
del names[0]
del names[0]
print_visitor(names)
